<div class="row toolbar">
  <div class="col-md-6">
    <span class="toolbar-header">
      <%= t :staff_list %>
    </span>
  </div>
  <div class="col-md-6 text-right">
    <ul class="toolbar-nav">
      <li><%= link_to feather_icon('circle-plus'), new_staff_path %></li>
      <li><%= link_to feather_icon('trash'), new_staff_path %></li>
      <li><%= link_to feather_icon('file-add'), new_staff_path %></li>
    </ul>
    <input type="text" placeholder="Search" class="search-box" />
  </div>
</div>

<table class="table table-striped">
  <thead>
    <tr>
      <th><%= t :full_name %></th>
      <th><%= t :role %></th>
      <th><%= t :active %></th>
      <th><%= t :dob %></th>
      <th><%= t :mobile %></th>
      <th>Email</th>
      <th><%= t :address %></th>
    </tr>
  </thead>

  <tbody>
    <% @staffs.each do |staff| %>
      <tr>
        <td style="min-width: 200px"><%= link_to staff.full_name , staff %></td>
        <td><%= staff.staff_role_id %></td>
        <td><%= staff.active %></td>
        <td><%= staff.dob %></td>
        <td><%= staff.mobile %></td>
        <td><%= staff.email %></td>
        <td><%= staff.contacts.map{ |c| c.address }.join(', ') %></td>
      </tr>
    <% end %>
  </tbody>
</table>


